package com.webank.wedatasphere.qualitis.question.service.transform;

import com.webank.wedatasphere.qualitis.entity.User;
import com.webank.wedatasphere.qualitis.question.entity.Order;
import com.webank.wedatasphere.qualitis.question.service.dto.UserDto;

public class OrderTransform {
    public static UserDto toUserDto(User user){
        return new UserDto().setId(user.getId()).setUsername(user.getChineseName()).setText(user.getChineseName());
    }

    public static UserDto orderToUserDto(Order order){
        return new UserDto().setId(order.getHandler()).setUsername(order.getHandlerName()).setText(order.getHandlerName());
    }
}
